home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 3 / Amiga Tools 3.iso / rexx / nexterror.quill < prev    next >
Text File  |  1995-08-29  |  1KB  |  53 lines

  1.  
  2. /**
  3.  **  $VER: NextError.quill 1.0 (24.7.94)
  4.  **  By Timothy J. Aston
  5.  **
  6.  **/
  7.  
  8.  
  9. /* Some setup first.
  10.  */
  11. options results
  12. options failat 200
  13.  
  14. NL = d2c(10)
  15.  
  16. main:
  17.     /* Open the errors file.
  18.      */
  19.     if open('errors_fh', 't:Quill_Errors', 'R') then do
  20.         'GETATTR' 'PROJECT FILE VAR' filename
  21.         'GETATTR' 'PROJECT LINE VAR' linenum
  22.  
  23.         /* Read all the errors into a stem.
  24.          */
  25.         ok = TRUE
  26.         do while ~eof('errors_fh') & ok = TRUE
  27.             errorfile = strip(readln('errors_fh'), 'B')
  28.             errorline = strip(readln('errors_fh'), 'B')
  29.             errorcol = strip(readln('errors_fh'), 'B')
  30.             errordesc = strip(readln('errors_fh'), 'B')
  31.             call readln('errors_fh')
  32.             call readln('errors_fh')
  33.  
  34.             if errorfile = filename & errorline > linenum then do
  35.                 'GOTOLINE' errorline
  36.                 'SETSTATUSBAR' errordesc
  37.                 ok = FALSE
  38.             end
  39.         end
  40.  
  41.         if ok = TRUE then do
  42.             'REQUESTNOTIFY' '"No more errors in this file"'
  43.         end
  44.  
  45.         close('errors_fh');
  46.     end
  47.     /* Or if its not there, we have no errors.
  48.      */
  49.     else
  50.         'REQUESTNOTIFY' '"No errors"'
  51.  
  52.     exit
  53.